{% extends "WebConsole/base.html" %}

{% block content %}
<div class="row placeholders">
    <table class="table table-striped table-condensed">
      <thead>
        <tr>
          <th>配置名称</th>
          <th>系统用户名</th>
          <th>cellapp</th>
          <th>baseapp</th>
          <th>cellappmgr</th>
          <th>baseappmgr</th>
          <th>loginapp</th>
          <th>dbmgr</th>
          <th>interfaces</th>
          <th>logger</th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
        {% for layout in KBELayouts %}
        <tr>
          <td>{{ layout.layout_name }}</td>
          <td>{{ layout.sys_user }}</td>
          <td>{{ layout.cellapp }}</td>
          <td>{{ layout.baseapp }}</td>
          <td>{{ layout.cellappmgr }}</td>
          <td>{{ layout.baseappmgr }}</td>
          <td>{{ layout.loginapp }}</td>
          <td>{{ layout.dbmgr }}</td>
          <td>{{ layout.interfaces }}</td>
          <td>{{ layout.logger }}</td>
          <td>
            <ul class="list-inline">
                <li><a href="/wc/components/delete_layout?id={{layout.id}}">删除</a></li>
                <li><a href="#" onClick="load_layout({{ layout.id }})">加载</a></li>
            </ul>
          </td>
        </tr>
        {% endfor %}
      </tbody>
    </table>
</div>
{% endblock %}

{% block tail_js %}
<script>$(".config").addClass("active");</script>
<script>
  $(".kbe-list .dd").hide();
  $(".kbe-list .components .dd").show();
  $(".kbe-list .components ").css({"background-color":"#317eb4"});
  $(".kbe-list .components").find('li').addClass("menu_chioce");
    // function load_layout(layoutID)
    // {
    //     window.location.href='/wc/components/load_layout?id=' + layoutID;
    //     layer.msg('服务器正在加载……', {icon: 16, time: 10000});
    // }
    function load_layout(layoutID)
    {
        
        href = "/wc/components/load_layout?id="+ layoutID;
        layer.open({
            type: 2,
            title: "加载服务器配置",
            closeBtn: 1,
            shade: [0.3,'#000'],
            //shadeClose: true,
            area: ['80%', '70%'],
            scrollbar: false,
            // skin: 'layui-layer-rim', //加上边框
            content: href,
            end: function (){
                 location.href='/wc/components/manage';
            }
        });
    }

</script>
    
{% endblock %}
